<?php

namespace App\Enums;

use App\Traits\EnumMethods;

enum LayerPosition: string
{
    use EnumMethods;

    case TOP_LEFT = 'top-left';
    case TOP = 'top';
    case TOP_RIGHT = 'top-right';
    case LEFT = 'left';
    case CENTER = 'center';
    case RIGHT = 'right';
    case BOTTOM_LEFT = 'bottom-left';
    case BOTTOM = 'bottom';
    case BOTTOM_RIGHT = 'bottom-right';

    const POSITION_MAP = [
        self::TOP_LEFT->value => '上-左',
        self::TOP->value => '上',
        self::TOP_RIGHT->value => '上-右',
        self::LEFT->value => '左',
        self::CENTER->value => '居中',
        self::RIGHT->value => '右',
        self::BOTTOM_LEFT->value => '下-左',
        self::BOTTOM->value => '下',
        self::BOTTOM_RIGHT->value => '下-右',
    ];

    public function toString(): string
    {
        return self::POSITION_MAP[$this->value];
    }
}
